Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor supported routes fetching #2875

Open
wants to merge 7 commits into
base: development
Choose a base branch
from

Conversation

artursapek
Copy link
Collaborator

This change moves the "supported routes" list out of Redux, because the only place we really need it is the useSupportedRoutesWithQuotes hook. It is now fetched in there and pipelined into the downstream quotes call.

Here is a loom demonstrating the reason I made this change in the first place... it improves how the UI transitions through the loading state:

https://www.loom.com/share/5aab31c51e8346e09bd533d05ffde5e5

Copy link

netlify bot commented Oct 24, 2024

👷 Deploy request for wormhole-connect pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 79588a1

Copy link

netlify bot commented Oct 24, 2024

👷 Deploy request for wormhole-connect-mainnet pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 79588a1


const { token, destToken, fromChain, toChain, amount } = useSelector(
(state: RootState) => state.transferInput,
);

const { toNativeToken } = useSelector((state: RootState) => state.relay);

const [debouncedAmount] = useDebounce(amount, 500);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this debounce is redundant with another one in AmountInput. causes unneeded delay.

@@ -165,7 +131,7 @@ const Routes = ({ ...props }: Props) => {
{props.isLoading && renderRoutes.length === 0 ? (
<Skeleton variant="rounded" height={153} width="100%" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: Instead of one empty skeleton, do you think we can have two small horizontal ones at the top and a bigger one below those, to imitate this look:

Screenshot 2024-10-24 at 3 59 25 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants